<?php

require_once ('Zend/Form.php');

class Form_Subject_Edit extends Form_Subject_Add {
	
	public function __construct($options = null) {
		parent::__construct ($options);

		$this->setName('subjectForm');
		$this->addDecorator('Fieldset',array('legend' => 'Upraviť predmet'));
		
		$subjectName = $this->getElement('subjectName');
		$subjectName->setName('name')
		->addDecorator('HtmlTag');
		
		$this->clearElements();
		
		$question = new Zend_Form_Element_Textarea('question');
		$question->setLabel('Otázka')
		->addFilter('StringTrim')
		->addFilter('StripTags');
		
		$newQuestion = new Zend_Form_Element_Button('newQuestion');
		$newQuestion->setLabel('Pridať otázku');
		
		$sid = new Zend_Form_Element_Hidden('sid');		
		
		$this->addElements(array($subjectName,$question,$newQuestion,$sid));
		
	}
}